const routes = [
    {
      path: '/home',
      name: 'home',
      component: () => import('../views/HomeView.vue'),
      children:[
        {
          path: '/home/homepage',
          name: 'homepage',
          meta:{ title:'首页' },
          component: () => import('../components/HomePage.vue'),
        },
        {
          path: '/home/bbtpage',
          name: 'bbtpage',
          meta:{ title:'爆爆团' },
          component: () => import('../components/BbtPage.vue'),
        },
        {
          path: '/home/indendpage',
          name: 'indendpage',
          meta:{ title:'订单' },
          component: () => import('../components/IndendPage.vue'),
        },
        {
          path: '/home/minepage',
          name: 'minepage',
          meta:{ title:'我的' },
          component: () => import('../components/MinePage.vue'),
        },
        {
          path:'/home',
          redirect:'/home/homepage',
        },
        {
          path:'*',
          component:()=>import('../views/NotFound.vue')
        }
      ]
    },
    {
      path:'/shop/:id',
      name:'shop',
      meta:{ title:'店铺' },
      component:()=>import('../views/ShopView.vue')
    },
    {
      path:'/search',
      name:'search',
      meta:{ title:'搜索' },
      component:()=>import('../views/SearchView.vue')
    },
    {
      path:'/login',
      name:'login',
      meta:{ title:'登录' },
      component:()=>import('../views/LoginView.vue')
    },
    {
      path:'/register',
      name:'register',
      meta:{ title:'注册' },
      component:()=>import('../views/RegisterView.vue')
    },
    {
      path:'/save',
      name:'save',
      meta:{ title:'收藏' },
      component:()=>import('../views/SaveView.vue')
    },
    {
      path:'/',
      redirect:'/login',
    },
    {
      path:'*',
      component:()=>import('../views/NotFound.vue')
    }
]

export default routes;